﻿<UserControl x:Class="SilverNibbles.PauseControl"
    xmlns="http://schemas.microsoft.com/client/2007" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             xmlns:sn="clr-namespace:SilverNibbles"
    Width="400" Height="200">
    <Border Width="400" Height="200" BorderBrush="Black" BorderThickness="4" CornerRadius="5" x:Name="pauseBorder">
        <Border.Background>
            <LinearGradientBrush EndPoint="0,1">
                <GradientStop Color="AliceBlue" Offset="-0.1" />
                <GradientStop Color="Aqua" Offset="1.5" />
            </LinearGradientBrush>
        </Border.Background>
        <Border.Resources>
            <Storyboard x:Name="appearStoryboard">
                <DoubleAnimation Storyboard.TargetName="pauseBorder" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.3" />
                <DoubleAnimation Storyboard.TargetName="scaleTransform" Storyboard.TargetProperty="ScaleX" From="0.25" To="1" Duration="0:0:0.3" />
                <DoubleAnimation Storyboard.TargetName="scaleTransform" Storyboard.TargetProperty="ScaleY" From="0.25" To="1" Duration="0:0:0.3" />
            </Storyboard>
            <Storyboard x:Name="disappearStoryboard">
                <DoubleAnimation Storyboard.TargetName="pauseBorder" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:0.3" />
                <DoubleAnimation Storyboard.TargetName="scaleTransform" Storyboard.TargetProperty="ScaleX" From="1" To="0.25" Duration="0:0:0.3" />
                <DoubleAnimation Storyboard.TargetName="scaleTransform" Storyboard.TargetProperty="ScaleY" From="1" To="0.25" Duration="0:0:0.3" />
            </Storyboard>
        </Border.Resources>
        <Border.RenderTransform>
            <ScaleTransform 
                ScaleX="1" 
                ScaleY="1" 
                CenterX="200" 
                CenterY="100" 
                x:Name="scaleTransform"/>
        </Border.RenderTransform>
        <StackPanel Orientation="Vertical">
            <TextBlock HorizontalAlignment="Center" 
                       Text="SilverNibbles v1.26" 
                       Foreground="CadetBlue"
                       TextWrapping="Wrap" 
                       FontWeight="Normal"
                       FontSize="36" 
                       FontFamily="teen bold.ttf#Teen" />

            <TextBlock x:Name="textBlockMessage" 
                       HorizontalAlignment="Center" 
                       Margin="8,0,8,0" 
                       Text="by Mark Heath, http://nibbles.codeplex.com" 
                       TextWrapping="Wrap" 
                       TextAlignment="Center"
                       FontWeight="Normal"
                       FontSize="18" 
                       FontFamily="teen bold.ttf#Teen"
                       MouseLeftButtonUp="textBlockMessage_MouseLeftButtonUp"/>
            <sn:Instructions x:Name="instructions" />
        </StackPanel>
        
        </Border>

</UserControl>